//
//  CommodityTableViewCell.m
//  CommodityManager
//
//  Created by lanou3g on 15/5/29.
//  Copyright (c) 2015年 libertyair. All rights reserved.
//

#import "CommodityTableViewCell.h"

@implementation CommodityTableViewCell

- (void)awakeFromNib {
    // Initialization code
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    
    self=[super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.imgView=[[UIImageView alloc] initWithFrame:CGRectMake(10, 10, 100, 120)];
        _imgView.backgroundColor=[UIColor yellowColor];
        self.nameLabel=[[UILabel alloc] initWithFrame:CGRectMake(120, 10, 160, 30)];
        _nameLabel.backgroundColor=[UIColor redColor];
        _nameLabel.text=@"特仑苏";
        self.numberLabel=[[UILabel alloc] initWithFrame:CGRectMake(120, 50, 160, 30)];
        _numberLabel.backgroundColor=[UIColor redColor];
            _numberLabel.text=@"45";
        self.priceLabel=[[UILabel alloc] initWithFrame:CGRectMake(120, 90,160, 30)];
        _priceLabel.text=@"200￥";
        _priceLabel.backgroundColor=[UIColor redColor];
        [self.contentView addSubview:_imgView];
        [self.contentView addSubview:_nameLabel];
        [self.contentView addSubview:_numberLabel];
        [self.contentView addSubview:_priceLabel];
    }
    return self;
    
}




- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
